const routes = [
  {
    path: "/",
    name: "root",
    component: () => import("../views/_layout.vue"),
    meta: {
      title: "CRM系统",
    },
    redirect: "/workbench",
    children: [
      {
        path: "workbench",
        name: "workbenchIndex",
        component: () => import("../views/workbench/_layout.vue"),
        meta: {
          title: "工作舱",
        },
        children: [
          {
            path: "",
            name: "workbench",
            component: () => import("../views/workbench/index.vue"),
            meta: {
              title: "工作舱",
            },
          },
          {
            path: "todo",
            name: "todo",
            component: () => import("../views/workbench/console/todo.vue"),
            meta: {
              title: "新增待办",
            },
          },
          {
            path: "commerce",
            name: "commerce",
            component: () => import("../views/workbench/console/commerce.vue"),
            meta: {
              title: "新增商机",
            },
          },
          {
            path: "view",
            name: "view",
            component: () => import("../views/workbench/common/view.vue"),
            meta: {
              title: "事项详情",
            },
          },
          {
            path: "cancel",
            name: "cancel",
            component: () => import("../views/workbench/common/cancel.vue"),
            meta: {
              title: "事项取消",
            },
          },
          {
            path: "apply",
            name: "apply",
            component: () => import("../views/workbench/common/apply.vue"),
            meta: {
              title: "外出申请",
            },
          },
          {
            path: "clock-in",
            name: "clock-in",
            component: () => import("../views/workbench/common/clockIn.vue"),
            meta: {
              title: "签到",
            },
          },
          {
            path: "clock-out",
            name: "clock-out",
            component: () => import("../views/workbench/common/clockOut.vue"),
            meta: {
              title: "签出",
            },
          },
          {
            path: "follow",
            name: "follow",
            component: () => import("../views/workbench/common/follow.vue"),
            meta: {
              title: "事项跟进",
            },
          },
          {
            path: "singleLocation",
            name: "singleLocation",
            component: () =>
              import("../views/workbench/statistics/singleLocation.vue"),
            meta: {
              title: "工作舱",
            },
          },
        ],
      },
      {
        path: "business",
        name: "business",
        component: () => import("../views/business/_layout.vue"),
        meta: {
          title: "公私海",
        },
        children: [
          {
            path: "",
            name: "workbench",
            component: () => import("../views/business/index.vue"),
            meta: {
              title: "工作舱",
            },
          },
          {
            path: "HighSeas",
            name: "HighSeas",
            component: () => import("../views/business/HighSeasDetails"),
            meta: {
              title: "公海详情",
            },
          },
          {
            path: "OuterZone",
            name: "OuterZone",
            component: () => import("../views/business/OuterZone"),
            meta: {
              title: "外区商机详情",
            },
          },
          {
            path: "PrivateSea",
            name: "PrivateSea",
            component: () => import("../views/business/PrivateSea"),
            meta: {
              title: "私海详情",
            },
          },
          {
            path: "SilentLibrary",
            name: "SilentLibrary",
            component: () => import("../views/business/silentLibrarydetails"),
            meta: {
              title: "沉寂库详情",
            },
          },
          {
            path: "TemporaryLibrary",
            name: "TemporaryLibrary",
            component: () => import("../views/business/TemporaryLibrary"),
            meta: {
              title: "临时库详情",
            },
          },
          {
            path: "search",
            name: "search",
            component: () => import("../views/business/searchPage"),
            meta: {
              title: "搜索商机",
            },
          },
          {
            path: "dropBusiness",
            name: "dropBusiness",
            component: () => import("../views/business/dropBusiness"),
            meta: {
              title: "我即将掉落的商机",
            },
          },
        ],
      },
    ],
  },
];
export default routes;
